package com.feihong.dubbo.publish.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhufeihong
 * @since 2019/7/5-17:11
 */
@Configuration
@MapperScan(basePackages = MybatisPlusConfig.PACKAGES)
public class MybatisPlusConfig {

    /**
     * 扫描mapper基础包路径
     */
    static final String PACKAGES = "com.feihong.dubbo.repo.mapper";

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
